package tack10;

/**
 * 动物
 */
public class Animal {
    /***颜色*/
    private String color;
    /***年龄*/
    private int age;

    public Animal(){}
    public Animal(String color , int age){
        this.color=color;
        this.age = age;
    }
    /***方法*/
    public void describe(){
        System.out.println("这是一只" + color + "  "  + age + "岁的");
    }

    /**
     * 访问  修改
     */
    public String getColor() {
        return color;
    }
    public void setColor(String color) {
        this.color = color;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
}
